using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration; using Sispe.Entities;

namespace Sispe.Repository.Mapping
{
    public class CURRICULOMap : EntityTypeConfiguration<CURRICULO>
    {
        public CURRICULOMap()
        {
            // Primary Key
            this.HasKey(t => t.IdTrabajador);

            // Properties
            // Table & Column Mappings
            this.ToTable("CURRICULO");
            this.Property(t => t.IdTrabajador).HasColumnName("IdTrabajador");
            this.Property(t => t.Imagen).HasColumnName("Imagen");
            this.Property(t => t.Hash).HasColumnName("Hash");

            // Relationships
            this.HasRequired(t => t.TRABAJADOR)
                .WithOptional(t => t.CURRICULO);
        }
    }
}
